package com.lizhenhua.fmmall.mapper;

import com.lizhenhua.fmmall.entity.ProductComments;
import com.lizhenhua.fmmall.entity.ProductCommentsVo;
import com.lizhenhua.fmmall.general.GeneralDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductCommentsMapper extends GeneralDao<ProductComments> {

    // 查询所有评论
    List<ProductCommentsVo> selectCommentsByProduct(String productId);

    // 查询分页评论  start起始条数 limit每页几条
    List<ProductCommentsVo> selectPageHelperCommentsByProduct(@Param("productId") String productId,
                                                              @Param("start") int start,
                                                              @Param("limit") int limit);
}